<%- generateApiSummary("    ", datatype, "description")
%>    public static class <%- datatype.name %><% if (datatype.sortKey) { %> implements Comparable<<%- datatype.name %>><% } %> {<% for(var i in datatype.properties) { var property = datatype.properties[i] %>
<%- generateApiSummary("        ", property, "description")
%><%- getPropertyAttribs("        ", property, datatype, api)
%>        public <%- getPropertyDef(property, datatype) %>;<% } %>
        <% if (datatype.sortKey) { %>
        public int compareTo(<%- datatype.name %> other) {
            if (other == null || other.<%- datatype.sortKey%> == null) return 1;
            if (<%- datatype.sortKey%> == null) return -1;
            return <%- datatype.sortKey%>.compareTo(other.<%- datatype.sortKey%>);
        }<% } %>
    }
